package com.bwie.controller;

import com.bwie.service.TbDictService;
import com.bwie.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/shop/dict")
public class DictController {
    @Autowired
    TbDictService tbDictService;

    /**
     * 根据类型ID 获取字典列表
     * @param typeId
     * @return
     */
    @PostMapping("/getDictList/{typeId}")
    public Result getDictList(@PathVariable("typeId") Integer typeId) {
        return tbDictService.getDictList(typeId);
    }
}
